import {getEx} from './crud'

console.log("***************************pic")

export function queryPic(uid,begin,end){
    begin = begin ? begin : ""
    end = end ? end : ""
    let url = "/picApi"
    if(uid || begin || end){
        let hasParam = false
        url = url + "?"
        if(uid){
            url += "ipcId=" + uid
            hasParam = true
        }
        if(begin){
            url += (hasParam ? "&" : "")
            url += "begin=" + begin
            hasParam = true
        }
        if(end){
            url += (hasParam ? "&" : "")
            url += "end=" + end
            hasParam = true
        }
    }
    return getEx(url)
}
export default{
    queryPic,
}